package com.mdd.common.pay.wxpay;
import java.io.InputStream;

import org.springframework.stereotype.Component;

import com.github.wxpay.sdk.WXPayConfig;

import lombok.Data;
/**
 *	微信支付配置类
 * @author liuz
 */
@Component
@Data
public class WxConfig implements WXPayConfig{

	/**
	 * 证书
	 */
	public InputStream certStream;

	/**
	 * HTTP(S) 连接超时时间，单位毫秒
	 */
	private int httpConnectTimeoutMs = 8000;

	/**
	 * HTTP(S) 读数据超时时间，单位毫秒
	 */
	private int httpReadTimeoutMs = 10000;


	@Override
	public int getHttpConnectTimeoutMs() {
		return httpConnectTimeoutMs;
	}

	@Override
	public int getHttpReadTimeoutMs() {
		return httpReadTimeoutMs;
	}

	@Override
	public String getAppID() {
		return WxPayConfigUtils.APPID;
	}

	@Override
	public String getMchID() {
		return WxPayConfigUtils.MCHID;
	}

	@Override
	public String getKey() {
		return WxPayConfigUtils.APIV2KEY;
	}

}
